package main

import (
	"fmt"
	"os"
)

func main() {
	file, error := os.Open("./1.txt")
	if error != nil {
		fmt.Printf("打开文件出错！", error)
	}
	defer file.Close()
	b := make([]byte, 1024)
	f, err := file.Read(b)
	if err != nil {
		fmt.Printf("读取文件出错！", error)
	}
	fmt.Println(string(b[:f]))
}
